﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace ClearDirectory
{
    /// <summary>
    /// 清除指定的文件或目录
    /// </summary>
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Form1());

            if (args.Length > 0)
            {
                string path = args[0];

                // 删除目录
                if (System.IO.Directory.Exists(path)) System.IO.Directory.Delete(path, true);

                // 删除文件
                if (System.IO.File.Exists(path)) System.IO.File.Delete(path);
            }
        }
    }
}
